home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 19 / CU Amiga Magazine's Super CD-ROM 19 (1998)(EMAP Images)(GB)[!][issue 1998-02].iso / CUCD / Readers / Gui4Cli / Docs / Tutorials / Buttons.gc next >
Text File  |  1997-12-02  |  1KB  |  41 lines

  1. G4C
  2.  
  3. ; a very simple gui displaying buttons..
  4.  
  5.  
  6. WINBIG 114 60 384 98 "Buttons.gc"    ; our window
  7. WinType 11110001                     ; what system gadgets it should have etc
  8.  
  9.                                      ; some cosmetics..
  10. Winbackground icon guis:gui4cli 0    ; fill the background with G4C icons
  11. BOX 0 0 0 0 OUT button               ; draw a border sized box..
  12.  
  13. xonLoad                              ; what to do upon loading of the gui
  14. GuiOpen Buttons.gc
  15.  
  16. xonClose                             ; what to do upon closing it
  17. GuiQuit Buttons.gc
  18.  
  19.  
  20. ; 3 Buttons - each of them has five arguments :
  21. ; Left  Top  Width  Height  Title
  22.  
  23.  
  24. XBUTTON 34 25 85 50   'A'
  25. SetWinTitle Buttons.gc "You clicked on button A"
  26.  
  27. XBUTTON 156 25 85 50   'B'
  28. SetWinTitle Buttons.gc "That time you chose B"
  29.  
  30. XBUTTON 269 25 85 50   'C'
  31. SetWinTitle Buttons.gc "That's the C button"
  32.  
  33.  
  34. ; That's it.. 
  35.  
  36. ; NOTE : when each button is pressed the commands attached to it are
  37. ; executed. In this case it's only one command (SetWinTitle), but it
  38. ; could be anything from no commands to as many as you want, which
  39. ; could also call other subroutines in this or other files etc..
  40.  
  41.